Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and update API calls, v9 #285

Merged
merged 2 commits into from Jun 28, 2021
Merged

Add and update API calls, v9 #285

merged 2 commits into from Jun 28, 2021

Conversation

jgratz
Copy link
Contributor

@jgratz jgratz commented Jun 22, 2021

Hey @Nerzal! I want to bring a couple of changes from our fork back to upstream :) Let me know if something is missing. The tests are failing on what I think is an unrelated change (TestGocloak_CreateGetUpdateDeleteResourcePolicy: Keycloak returns a 500 with error message unknown_error) — maybe you can have a look as well?

Changes:

bump version to v9.0.0

updated function signatures, backwards incompatible:

  • GetRealmRoles(ctx context.Context, accessToken, realm string, params GetRolesParams) ([]*Role, error)
  • GetClientRoles(ctx context.Context, accessToken, realm, clientID string, params GetRolesParams) ([]*Role, error)
  • CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (string, error)

added new functions:

  • GetRealmRoleByID(ctx context.Context, token, realm, roleID string) (*Role, error)
  • UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) error
  • GetCompositeRealmRoles(ctx context.Context, token, realm, roleName string) ([]*Role, error)
  • GetIdentityProviderMapper(ctx context.Context, token string, realm string, alias string, mapperID string) (*IdentityProviderMapper, error)

@Nerzal
Copy link
Owner

Nerzal commented Jun 24, 2021

thank you for the contribution :)
Can you please resolve the merge conflicts?

I'm going to merge after and then i'll search for a solution for failing test pipelines (before submitting a new tag)

jgratz added 2 commits June 25, 2021 17:38
updated function signatures, backwards incompatible:
- GetRealmRoles(ctx context.Context, accessToken, realm string, params GetRolesParams) ([]*Role, error)
- GetClientRoles(ctx context.Context, accessToken, realm, clientID string, params GetRolesParams) ([]*Role, error)
- CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (string, error)

added new functions:
- GetRealmRoleByID(ctx context.Context, token, realm, roleID string) (*Role, error)
- UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) error
- GetCompositeRealmRoles(ctx context.Context, token, realm, roleName string) ([]*Role, error)
- GetIdentityProviderMapper(ctx context.Context, token string, realm string, alias string, mapperID string) (*IdentityProviderMapper, error)
@jgratz
Copy link
Contributor Author

jgratz commented Jun 25, 2021

Rebased and removed the v9 for now. Also fixed the failing TestGocloak_ImportIdentityProviderConfigFromFile. TestGocloak_CreateGetUpdateDeleteResourcePolicy however is still failing.

@Nerzal
Copy link
Owner

Nerzal commented Jun 28, 2021

thank you for your contribution.
I'll merge for now. A new tag will be released, when i have found a solution for the test issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants